#ifndef J_LIST_H
#define J_LIST_H

#ifdef __cplusplus
extern "C" {
#endif
	
typedef struct _SListNode {
	void * m_pvData;
	struct _SListNode * m_pstNext;
}SListNode, *PSListNode;

typedef struct _SList {
	SListNode * m_pstHead;
	SListNode * m_pstTail;
	int m_iNum;
}SList, *PSList;

SList * JList_pstCreate();

void JList_free(SList * pstList);

int JList_add(SList * pstList, void * pvData);

int JList_delIndex(SList * pstList, int iIndex);

int JList_del(SList * pstList, SListNode * pstListNode);

SListNode * JList_first(SList * pstList);

void JList_print(SList * pstList);

#ifdef __cplusplus
}
#endif
#endif
